Integrand size = 18, antiderivative size = 123 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{3 a^2 f^2}+\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f} \]
-2/3*d*ln(cosh(1/2*f*x+1/2*e))/a^2/f^2+1/6*d*sech(1/2*f*x+1/2*e)^2/a^2/f^2 +1/3*(d*x+c)*tanh(1/2*f*x+1/2*e)/a^2/f+1/6*(d*x+c)*sech(1/2*f*x+1/2*e)^2*t anh(1/2*f*x+1/2*e)/a^2/f
Time = 0.70 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.93 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\frac {\cosh \left (\frac {1}{2} (e+f x)\right ) \left (-2 d \cosh \left (\frac {3}{2} (e+f x)\right ) \log \left (\cosh \left (\frac {1}{2} (e+f x)\right )\right )+\cosh \left (\frac {1}{2} (e+f x)\right ) \left (2 d-6 d \log \left (\cosh \left (\frac {1}{2} (e+f x)\right )\right )\right )+f (c+d x) \left (3 \sinh \left (\frac {1}{2} (e+f x)\right )+\sinh \left (\frac {3}{2} (e+f x)\right )\right )\right )}{3 a^2 f^2 (1+\cosh (e+f x))^2} \]
(Cosh[(e + f*x)/2]*(-2*d*Cosh[(3*(e + f*x))/2]*Log[Cosh[(e + f*x)/2]] + Co sh[(e + f*x)/2]*(2*d - 6*d*Log[Cosh[(e + f*x)/2]]) + f*(c + d*x)*(3*Sinh[( e + f*x)/2] + Sinh[(3*(e + f*x))/2])))/(3*a^2*f^2*(1 + Cosh[e + f*x])^2)
Time = 0.51 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.97, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {3042, 3799, 3042, 4673, 3042, 4672, 26, 3042, 26, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {c+d x}{(a \cosh (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{\left (a+a \sin \left (i e+i f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int (c+d x) \text {sech}^4\left (\frac {e}{2}+\frac {f x}{2}\right )dx}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (c+d x) \csc \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{2}\right )^4dx}{4 a^2}\) |
\(\Big \downarrow \) 4673 |
\(\displaystyle \frac {\frac {2}{3} \int (c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )dx+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2}{3} \int (c+d x) \csc \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{2}\right )^2dx+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}-\frac {2 i d \int -i \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )dx}{f}\right )+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}-\frac {2 d \int \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )dx}{f}\right )+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}-\frac {2 d \int -i \tan \left (\frac {i e}{2}+\frac {i f x}{2}\right )dx}{f}\right )+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}+\frac {2 i d \int \tan \left (\frac {i e}{2}+\frac {i f x}{2}\right )dx}{f}\right )+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {2}{3} \left (\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{f}-\frac {4 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{f^2}\right )+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f}+\frac {2 d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 f^2}}{4 a^2}\) |
((2*d*Sech[e/2 + (f*x)/2]^2)/(3*f^2) + (2*(c + d*x)*Sech[e/2 + (f*x)/2]^2* Tanh[e/2 + (f*x)/2])/(3*f) + (2*((-4*d*Log[Cosh[e/2 + (f*x)/2]])/f^2 + (2* (c + d*x)*Tanh[e/2 + (f*x)/2])/f))/3)/(4*a^2)
3.2.18.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(-b^2)*(c + d*x)*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (-Simp[b^2*d*((b*Csc[e + f*x])^(n - 2)/(f^2*(n - 1)*(n - 2))), x] + S imp[b^2*((n - 2)/(n - 1)) Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2]
Time = 0.20 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.67
method | result | size |
parallelrisch | \(\frac {4 \ln \left (1-\tanh \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) d -\left (d x +c \right ) f \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )^{3}-d \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )^{2}+3 \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) f \left (d x +c \right )+2 d x f}{6 f^{2} a^{2}}\) | \(82\) |
risch | \(\frac {2 d x}{3 f \,a^{2}}+\frac {2 d e}{3 f^{2} a^{2}}-\frac {2 \left (3 \,{\mathrm e}^{f x +e} d f x +3 \,{\mathrm e}^{f x +e} c f +d x f -{\mathrm e}^{2 f x +2 e} d +c f -{\mathrm e}^{f x +e} d \right )}{3 f^{2} a^{2} \left (1+{\mathrm e}^{f x +e}\right )^{3}}-\frac {2 d \ln \left (1+{\mathrm e}^{f x +e}\right )}{3 f^{2} a^{2}}\) | \(108\) |
1/6*(4*ln(1-tanh(1/2*e+1/2*f*x))*d-(d*x+c)*f*tanh(1/2*e+1/2*f*x)^3-d*tanh( 1/2*e+1/2*f*x)^2+3*tanh(1/2*e+1/2*f*x)*f*(d*x+c)+2*d*x*f)/f^2/a^2
Leaf count of result is larger than twice the leaf count of optimal. 385 vs. \(2 (95) = 190\).
Time = 0.25 (sec) , antiderivative size = 385, normalized size of antiderivative = 3.13 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\frac {2 \, {\left (d f x \cosh \left (f x + e\right )^{3} + d f x \sinh \left (f x + e\right )^{3} + {\left (3 \, d f x + d\right )} \cosh \left (f x + e\right )^{2} + {\left (3 \, d f x \cosh \left (f x + e\right ) + 3 \, d f x + d\right )} \sinh \left (f x + e\right )^{2} - c f - {\left (3 \, c f - d\right )} \cosh \left (f x + e\right ) - {\left (d \cosh \left (f x + e\right )^{3} + d \sinh \left (f x + e\right )^{3} + 3 \, d \cosh \left (f x + e\right )^{2} + 3 \, {\left (d \cosh \left (f x + e\right ) + d\right )} \sinh \left (f x + e\right )^{2} + 3 \, d \cosh \left (f x + e\right ) + 3 \, {\left (d \cosh \left (f x + e\right )^{2} + 2 \, d \cosh \left (f x + e\right ) + d\right )} \sinh \left (f x + e\right ) + d\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + 1\right ) + {\left (3 \, d f x \cosh \left (f x + e\right )^{2} - 3 \, c f + 2 \, {\left (3 \, d f x + d\right )} \cosh \left (f x + e\right ) + d\right )} \sinh \left (f x + e\right )\right )}}{3 \, {\left (a^{2} f^{2} \cosh \left (f x + e\right )^{3} + a^{2} f^{2} \sinh \left (f x + e\right )^{3} + 3 \, a^{2} f^{2} \cosh \left (f x + e\right )^{2} + 3 \, a^{2} f^{2} \cosh \left (f x + e\right ) + a^{2} f^{2} + 3 \, {\left (a^{2} f^{2} \cosh \left (f x + e\right ) + a^{2} f^{2}\right )} \sinh \left (f x + e\right )^{2} + 3 \, {\left (a^{2} f^{2} \cosh \left (f x + e\right )^{2} + 2 \, a^{2} f^{2} \cosh \left (f x + e\right ) + a^{2} f^{2}\right )} \sinh \left (f x + e\right )\right )}} \]
2/3*(d*f*x*cosh(f*x + e)^3 + d*f*x*sinh(f*x + e)^3 + (3*d*f*x + d)*cosh(f* x + e)^2 + (3*d*f*x*cosh(f*x + e) + 3*d*f*x + d)*sinh(f*x + e)^2 - c*f - ( 3*c*f - d)*cosh(f*x + e) - (d*cosh(f*x + e)^3 + d*sinh(f*x + e)^3 + 3*d*co sh(f*x + e)^2 + 3*(d*cosh(f*x + e) + d)*sinh(f*x + e)^2 + 3*d*cosh(f*x + e ) + 3*(d*cosh(f*x + e)^2 + 2*d*cosh(f*x + e) + d)*sinh(f*x + e) + d)*log(c osh(f*x + e) + sinh(f*x + e) + 1) + (3*d*f*x*cosh(f*x + e)^2 - 3*c*f + 2*( 3*d*f*x + d)*cosh(f*x + e) + d)*sinh(f*x + e))/(a^2*f^2*cosh(f*x + e)^3 + a^2*f^2*sinh(f*x + e)^3 + 3*a^2*f^2*cosh(f*x + e)^2 + 3*a^2*f^2*cosh(f*x + e) + a^2*f^2 + 3*(a^2*f^2*cosh(f*x + e) + a^2*f^2)*sinh(f*x + e)^2 + 3*(a ^2*f^2*cosh(f*x + e)^2 + 2*a^2*f^2*cosh(f*x + e) + a^2*f^2)*sinh(f*x + e))
Time = 0.48 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.27 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\begin {cases} - \frac {c \tanh ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{6 a^{2} f} + \frac {c \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a^{2} f} - \frac {d x \tanh ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{6 a^{2} f} + \frac {d x \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a^{2} f} - \frac {d x}{3 a^{2} f} + \frac {2 d \log {\left (\tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{3 a^{2} f^{2}} - \frac {d \tanh ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{6 a^{2} f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{\left (a \cosh {\left (e \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
Piecewise((-c*tanh(e/2 + f*x/2)**3/(6*a**2*f) + c*tanh(e/2 + f*x/2)/(2*a** 2*f) - d*x*tanh(e/2 + f*x/2)**3/(6*a**2*f) + d*x*tanh(e/2 + f*x/2)/(2*a**2 *f) - d*x/(3*a**2*f) + 2*d*log(tanh(e/2 + f*x/2) + 1)/(3*a**2*f**2) - d*ta nh(e/2 + f*x/2)**2/(6*a**2*f**2), Ne(f, 0)), ((c*x + d*x**2/2)/(a*cosh(e) + a)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 239 vs. \(2 (95) = 190\).
Time = 0.22 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.94 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\frac {2}{3} \, d {\left (\frac {f x e^{\left (3 \, f x + 3 \, e\right )} + {\left (3 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )} + e^{\left (f x + e\right )}}{a^{2} f^{2} e^{\left (3 \, f x + 3 \, e\right )} + 3 \, a^{2} f^{2} e^{\left (2 \, f x + 2 \, e\right )} + 3 \, a^{2} f^{2} e^{\left (f x + e\right )} + a^{2} f^{2}} - \frac {\log \left ({\left (e^{\left (f x + e\right )} + 1\right )} e^{\left (-e\right )}\right )}{a^{2} f^{2}}\right )} + \frac {2}{3} \, c {\left (\frac {3 \, e^{\left (-f x - e\right )}}{{\left (3 \, a^{2} e^{\left (-f x - e\right )} + 3 \, a^{2} e^{\left (-2 \, f x - 2 \, e\right )} + a^{2} e^{\left (-3 \, f x - 3 \, e\right )} + a^{2}\right )} f} + \frac {1}{{\left (3 \, a^{2} e^{\left (-f x - e\right )} + 3 \, a^{2} e^{\left (-2 \, f x - 2 \, e\right )} + a^{2} e^{\left (-3 \, f x - 3 \, e\right )} + a^{2}\right )} f}\right )} \]
2/3*d*((f*x*e^(3*f*x + 3*e) + (3*f*x*e^(2*e) + e^(2*e))*e^(2*f*x) + e^(f*x + e))/(a^2*f^2*e^(3*f*x + 3*e) + 3*a^2*f^2*e^(2*f*x + 2*e) + 3*a^2*f^2*e^ (f*x + e) + a^2*f^2) - log((e^(f*x + e) + 1)*e^(-e))/(a^2*f^2)) + 2/3*c*(3 *e^(-f*x - e)/((3*a^2*e^(-f*x - e) + 3*a^2*e^(-2*f*x - 2*e) + a^2*e^(-3*f* x - 3*e) + a^2)*f) + 1/((3*a^2*e^(-f*x - e) + 3*a^2*e^(-2*f*x - 2*e) + a^2 *e^(-3*f*x - 3*e) + a^2)*f))
Leaf count of result is larger than twice the leaf count of optimal. 192 vs. \(2 (95) = 190\).
Time = 0.29 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.56 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\frac {2 \, {\left (d f x e^{\left (3 \, f x + 3 \, e\right )} + 3 \, d f x e^{\left (2 \, f x + 2 \, e\right )} - 3 \, c f e^{\left (f x + e\right )} - d e^{\left (3 \, f x + 3 \, e\right )} \log \left (e^{\left (f x + e\right )} + 1\right ) - 3 \, d e^{\left (2 \, f x + 2 \, e\right )} \log \left (e^{\left (f x + e\right )} + 1\right ) - 3 \, d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} + 1\right ) - c f + d e^{\left (2 \, f x + 2 \, e\right )} + d e^{\left (f x + e\right )} - d \log \left (e^{\left (f x + e\right )} + 1\right )\right )}}{3 \, {\left (a^{2} f^{2} e^{\left (3 \, f x + 3 \, e\right )} + 3 \, a^{2} f^{2} e^{\left (2 \, f x + 2 \, e\right )} + 3 \, a^{2} f^{2} e^{\left (f x + e\right )} + a^{2} f^{2}\right )}} \]
2/3*(d*f*x*e^(3*f*x + 3*e) + 3*d*f*x*e^(2*f*x + 2*e) - 3*c*f*e^(f*x + e) - d*e^(3*f*x + 3*e)*log(e^(f*x + e) + 1) - 3*d*e^(2*f*x + 2*e)*log(e^(f*x + e) + 1) - 3*d*e^(f*x + e)*log(e^(f*x + e) + 1) - c*f + d*e^(2*f*x + 2*e) + d*e^(f*x + e) - d*log(e^(f*x + e) + 1))/(a^2*f^2*e^(3*f*x + 3*e) + 3*a^2 *f^2*e^(2*f*x + 2*e) + 3*a^2*f^2*e^(f*x + e) + a^2*f^2)
Time = 1.69 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.12 \[ \int \frac {c+d x}{(a+a \cosh (e+f x))^2} \, dx=\frac {2\,d}{3\,a^2\,f^2\,\left ({\mathrm {e}}^{e+f\,x}+1\right )}-\frac {2\,\left (d+c\,f+d\,f\,x\right )}{3\,a^2\,f^2\,\left (2\,{\mathrm {e}}^{e+f\,x}+{\mathrm {e}}^{2\,e+2\,f\,x}+1\right )}+\frac {2\,d\,x}{3\,a^2\,f}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e+1\right )}{3\,a^2\,f^2}-\frac {4\,{\mathrm {e}}^{e+f\,x}\,\left (c+d\,x\right )}{3\,a^2\,f\,\left (3\,{\mathrm {e}}^{e+f\,x}+3\,{\mathrm {e}}^{2\,e+2\,f\,x}+{\mathrm {e}}^{3\,e+3\,f\,x}+1\right )} \]